<?php defined('SYSPATH') or die('No direct script access.');

class Click extends Track {

	protected $medium;
	protected $categories;
	protected $subcategories;
	protected $campaign;

	public function __construct($recipient_id='', $categories='', $subcategories='', $medium='', $campaign='', $hashcookie='', $ipRecipient='')
	{
		parent::__construct();
		$this->event_type = 'click';
		if($ipRecipient!='') $this->ip = $ipRecipient;
		$this->campaign = $campaign;
		$this->medium = $medium;
		$this->subcategories = $subcategories;
		$this->categories = $categories;
		$this->hashcookie = $hashcookie;
		$this->recipient_id = $recipient_id;
	}

	public function saveFileEvent($childArrayData=array()){
		$data = array(
			'medium' => $this->medium,
			'subcategories' => $this->subcategories,
			'categories' => $this->categories,
			'campaign' => $this->campaign,
		);
		parent::saveFileEvent($data);
	}

	public function doTrack($childArrayData=array()){
		$data = array(
			'medium' => $this->medium,
			'subcategories' => $this->subcategories,
			'categories' => $this->categories,
			'campaign' => $this->campaign,
		);
		parent::doTrack($data);
	}
}